<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <title>Bootstrap坍方效果案例</title>
</head>

<body>
    <div class="container">
        <a href="#collapseExample" data-toggle="collapse" class="btn btn-primary">点击查看</a>
        <div class="collapse" id="collapseExample">
            <div class="well">
                Hello
            </div>
        </div>

        <div class="panel-group" id="accordion" role="tablist">

            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="tabOne">
                    <h4 class="panel-title">
                        <a href="#collapseOne" data-toggle="collapse" data-parent="#accordion">Item1</a>
                    </h4>
                </div>
                <div id="collapseOne" class="panel-collpase collapse in" role="tabpanel">
                    <div class="panel-body">
                        Hello欢迎来到实力至上主义的教室 Hello欢迎来到实力至上主义的教室 Hello欢迎来到实力至上主义的教室 Hello欢迎来到实力至上主义的教室
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="tabOne">
                    <h4 class="panel-title">
                        <a href="#collapseTwo" data-toggle="collapse" data-parent="#accordion">Item1</a>
                    </h4>
                </div>
                <div id="collapseTwo" class="panel-collpase collapse" role="tabpanel">
                    <div class="panel-body">
                        Hello欢迎来到实力至上主义的教室 Hello欢迎来到实力至上主义的教室 Hello欢迎来到实力至上主义的教室 Hello欢迎来到实力至上主义的教室
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="tabOne">
                    <h4 class="panel-title">
                        <a href="#collapseThree" data-toggle="collapse" data-parent="#accordion">Item1</a>
                    </h4>
                </div>
                <div id="collapseThree" class="panel-collpase collapse" role="tabpanel">
                    <div class="panel-body">
                        Hello欢迎来到实力至上主义的教室 Hello欢迎来到实力至上主义的教室 Hello欢迎来到实力至上主义的教室 Hello欢迎来到实力至上主义的教室
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="../js/jquery-1.12.4.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <script>
        $('#accordion').on('hidden.bs.collapse', function() {
            alert("collapse");
        })
    </script>
</body>

</html>